<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
  <TITLE> binh-example </TITLE>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  <link rel="stylesheet" type="text/css" href="../script/css/jquery-binh.css">
  <script type="text/javascript" src="jquery-1.7.2.min.js"></script>
  <script type="text/javascript" src="../script/jquery-binh.js"></script>
 </HEAD>

 <BODY>
<div>
<input type="button" value="add" name="btn-add"/>
<input type="button" value="load" name="btn-load"/>
<input type="button" value="json" name="btn-test"/>
</div>
<div class="main"></div>
<SCRIPT LANGUAGE="JavaScript">
$(function(){
	//设置弹出框的大小
	$.binhData.init({width:200,height:200});
	$('input[name="btn-add"]').click(function(){
		$('div.main').newset({});
	});
	//重新加载
	$('input[name="btn-load"]').click(function(){
		$('div.main').toload([{"oper":0,"left":1,"right":1,"content":{"type":0,"list":['女性','老年']}},{"oper":0,"left":1,"right":1,'content':{"type":0,'list':['工程师','青年']}}]);
	});
	//显示数据
	$('input[name="btn-test"]').click(function(){
		alert($('div.main').tojson());
	});
})
</SCRIPT>
 </BODY>
</HTML>
